Skip to content

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#17

Merged
AXIS5hacker merged 1 commit into
mainfrom
alert-autofix-1
Apr 18, 2026
Merged

Potential fix for code scanning alert no. 1: Workflow does not contain permissions#17
AXIS5hacker merged 1 commit into
mainfrom
alert-autofix-1

Conversation

@AXIS5hacker
Copy link
Copy Markdown
Owner

Potential fix for https://github.com/AXIS5hacker/DNX-Note-Width-Changer/security/code-scanning/1

To fix this, add an explicit permissions block to the workflow so GITHUB_TOKEN is constrained to least privilege.
Best single change (without altering functionality): add workflow-level permissions with contents: read near the top-level keys (name, on, jobs). This satisfies CodeQL’s recommendation and is sufficient for actions/checkout and the shown build steps. No new imports, methods, or dependencies are needed.

Edit file:

  • .github/workflows/build.yml
  • Insert:
    • permissions:
    • contents: read
  • Place it after the on: trigger block and before jobs: (or equivalently at top-level elsewhere).

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@AXIS5hacker AXIS5hacker marked this pull request as ready for review April 18, 2026 13:38
@AXIS5hacker AXIS5hacker merged commit 27bdd82 into main Apr 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant